{* Copyright (c) 2001, Shalmanov Marat. All rights reserved *}
 
unit AboutUnit;

interface

uses Windows, SysUtils, Classes, Graphics, Forms, Controls, StdCtrls,
  Buttons, ExtCtrls, ShellApi;

type
  TAboutBox1 = class(TForm)
    Panel1: TPanel;
    Copyright: TLabel;
    Comments: TLabel;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    Label4: TLabel;
    Label5: TLabel;
    Label6: TLabel;
    Label7: TLabel;
    Label8: TLabel;
    BitBtn1: TBitBtn;
    GroupBox1: TGroupBox;
    Memo1: TMemo;
    Label9: TLabel;
    PhysMem: TLabel;
    procedure Label6Click(Sender: TObject);
    procedure Label8Click(Sender: TObject);
    procedure FormKeyPress(Sender: TObject; var Key: Char);
    procedure FormCreate(Sender: TObject); 
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  AboutBox1: TAboutBox1;

implementation

uses MainUnit;

{$R *.dfm}

procedure TAboutBox1.Label6Click(Sender: TObject);
begin
ShellExecute(Handle,nil, 'mailto:1203marat@nm.ru',nil,nil,SW_SHOWNORMAL);
end;

procedure TAboutBox1.Label8Click(Sender: TObject);
begin
//open notepadm site url
ShellExecute(Application.Handle,'open','http://www.1203Marat.nm.ru/delphi/notepadm.html',nil,nil,0);
end;

procedure TAboutBox1.FormKeyPress(Sender: TObject; var Key: Char);
begin
//Close About windows where press esc button
if key = #27 then close;
end;

procedure TAboutBox1.FormCreate(Sender: TObject);
var
MS: TMemoryStatus;
begin
//Active Esc button
AboutBox1.KeyPreview:= True;

//Show Physical Memory Available to Windows
PhysMem.Caption:= FormatFloat('#,###" KB"', MS.dwTotalPhys / 1024);
end;

end.

